/**
 * Copyright (c) www.bugull.com
 */
package com.bugull.farm.core.store;

import com.bugull.mongo.SimpleEntity;
import com.bugull.mongo.annotations.EnsureIndex;
import com.bugull.mongo.annotations.Entity;

import java.util.Date;

/**
 * 用途:用于标示用户与子用户的链接关系
 *
 * @author loumt(loumt@hadlinks.com)
 */
@Entity
@EnsureIndex("{linkTime:1}")
public class LinkRelation extends SimpleEntity {

    private String username;//上层用户，权限授予者
    private String subUsername;//下层用户，权限被授予者
    private Date linkTime;//链接成立起始时间
    private String macAddress; //MAC地址

    private Boolean valid;//是否有效

    private String subNickName;//上层用户对下层用户的备注

    private String deviceName;//下层用户设备名称
    private String deviceLabel;//下层用户标签

    private Date lastOperationTime;//最后操作时间


    public Date getLastOperationTime() {
        return lastOperationTime;
    }

    public void setLastOperationTime(Date lastOperationTime) {
        this.lastOperationTime = lastOperationTime;
    }

    public String getDeviceLabel() {
        return deviceLabel;
    }

    public void setDeviceLabel(String deviceLabel) {
        this.deviceLabel = deviceLabel;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getSubNickName() {
        return subNickName;
    }

    public void setSubNickName(String subNickName) {
        this.subNickName = subNickName;
    }

    public String getMacAddress() {
        return macAddress;
    }

    public void setMacAddress(String macAddress) {
        this.macAddress = macAddress;
    }

    public Boolean getValid() {
        return valid;
    }

    public void setValid(Boolean valid) {
        this.valid = valid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getSubUsername() {
        return subUsername;
    }

    public void setSubUsername(String subUsername) {
        this.subUsername = subUsername;
    }

    public Date getLinkTime() {
        return linkTime;
    }

    public void setLinkTime(Date linkTime) {
        this.linkTime = linkTime;
    }


}
